// 底部导航栏
import 'package:flutter/material.dart';
import 'package:dog_read/pages/book/book.dart';
import 'package:dog_read/pages/more/more.dart';

class BottomTaps extends StatefulWidget {
  BottomTaps({Key key}) : super(key: key);

  @override
  createState() => BottomTapsState();
}

class BottomTapsState extends State<BottomTaps> {
  int _currentIndex = 0;

  List _pageList = [Book(), More()];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      
      body: this._pageList[this._currentIndex],
      bottomNavigationBar: BottomNavigationBar(
        currentIndex: this._currentIndex,
        onTap: (int index) {
          setState(() {
            this._currentIndex = index;
          });
        },
        items: [
          BottomNavigationBarItem(
              icon: Icon(Icons.bookmark),
              title: Text("书城"),
              activeIcon: Icon(
                Icons.bookmark,
              )),
          BottomNavigationBarItem(
            icon: Icon(Icons.more),
            title: Text("更多"),
          ),
        ],
      ),
    );
  }
}
